package com.feihong.txgw.utils;

import com.feihong.txgw.model.bean.user.SortModel;

import java.util.Comparator;

/**
 * Created by PVer on 2017/6/30.
 * 平阴分类
 */

public class PinyinComparator  implements Comparator<SortModel.DataBean.CityBean>  {


    @Override
    public int compare(SortModel.DataBean.CityBean o1, SortModel.DataBean.CityBean o2) {
        if ("@".equals(o1.getRegion_name())
                || "#".equals(o2.getRegion_name())) {
            return -1;
        } else if ("#".equals(o1.getRegion_name())
                || "@".equals(o2.getRegion_name())) {
            return 1;
        } else {
            return o1.getRegion_name().compareTo(o2.getRegion_name());
        }
    }

}
